<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const arr1 = new Array(2)
    const arr2 = [undefined, undefined]
    const arr3 = Array.apply(null, { length: 2 })
    console.log(arr1.map((item, index) => {
      return index
    }))
    console.log(arr2.map((item, index) => {
      return item
    }))
    console.log(arr3.map((item, index) => {
      return item
    }))
    // let a = [, ,]
    // let b = new Array(2)
    // console.log(a[0], a[1])
  </script>
</body>

</html>